<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>活动</title>
    <link rel="stylesheet" type="text/css" href="__CSS__api.css"/>
    <link rel="stylesheet" type="text/css" href="__CSS__aui.css"/>
    <link rel="stylesheet" type="text/css" href="__CSS__dropload.css"/>
    <link rel="stylesheet" type="text/css" href="__CSS__common.css"/>
    <style>
        .seatImg {
            width: 110px;
            height: 110px;
        }
        /*content*/
        html body {
            padding-top: 0.5rem;
        }

        .activity {
            padding: 0 0.7rem;
            background: #fff;
        }

        .activityImg {
            width: 4.825rem;
            height: 4.825rem;
            border-radius: 0.3rem;
            margin-right: 0.8rem;
        }

        .showImg {
            width: 100%;
            height: 100%;
        }

        .activityContent {
            display: flex;
            flex-flow: column;
            justify-content: space-between;
            height: 4.825rem;
            position: relative;
        }

        .activityTitle {
            color: #333;
            font-size: 0.8rem;
            margin-bottom: 0.2rem;
        }

        .box {
            margin-bottom: 0.25rem;
            display: flex;
            align-items: center;
        }

        .destination,
        .activityTime {
            color: #999;
            font-size: 0.65rem;
        }

        .logo1 {
            width: 0.65rem;
            height: 0.65rem;
            background: url('__IMG__location.png') no-repeat center center;
            background-size: 100% 100%;
            margin-right: 0.2rem;
        }

        .logo2 {
            width: 0.65rem;
            height: 0.65rem;
            background: url('__IMG__clock.png') no-repeat center center;
            background-size: 100% 100%;
            margin-right: 0.2rem;
        }

        .report {
            padding-top: 0.5rem;
            width: 100%;
            position: absolute;
            bottom: 0;
        }

        .signUp {
            text-align: right;
            font-size: 0.65rem;
            color: #FFBA71;
            padding-top: 25px;
        }

        .signUp1 {
            text-align: right;
            font-size: 0.65rem;
            color: #24A8FC;
            padding-top: 1.25rem;
        }

        .signUp2 {
            text-align: right;
            font-size: 0.65rem;
            color: #999;
            padding-top: 1.25rem;
        }

        .xian {
            width: 0.75rem;
            height: 0.75rem;
            display: inline-block;
            vertical-align: middle;
        }

        .moreActivity {
            width: 100%;
            height: 2.7rem;
            line-height: 2.7rem;
            color: #999;
            font-size: 0.7rem;
            text-align: center;
        }

        .juli {
            margin-bottom: 0.5rem;
        }

        .activityDetails {
            padding: 0.75rem 0 0.75rem 0;
        }

        .jiangzuo {
            position: relative;
            color: #ccc;
            font-size: 0.5rem;
            padding: 0.15rem 0.25rem;
            padding-bottom: 0.05rem;
            max-width: 5rem;
            height: 1rem;
            /*display: inline-block;*/
            float: left;
            margin-top: 1.1rem;
            margin-right: 2px;
        }


        .jiangzuo1 {
            position: relative;
            color: #ccc;
            font-size: 0.5rem;
            padding: 0.15rem 0.25rem;
            padding-bottom: 0.05rem;
            max-width: 5rem;
            height: 1rem;
            /*display: inline-block;*/
            float: right;
            margin-top: 1.1rem;
            margin-right: 2px;
        }
        .jiangzuo:after {
            width: 200%;
            height: 190%;
            position: absolute;
            top: -50%;
            left: -50%;
            transform-origin: 50% 50%;
            content: "";
            border: 1px solid #E6E6E6;
            border-radius: 0.4rem;
            -ms-transform: scale(0.5);
            /* IE 9 */
            -moz-transform: scale(0.5);
            /* Firefox */
            -webkit-transform: scale(0.5);
            -o-transform: scale(0.5);
            transform: scale(0.5);
            display: -webkit-box;
            overflow: hidden;
            text-overflow: ellipsis;
            word-wrap: break-word;
            word-break: break-all;
            white-space: normal !important;
            -webkit-line-clamp: 1;
            -webkit-box-orient: vertical;
        }

        /*footer*/
        .foott {
            font-size: 0.75rem;
            color: #ccc;
            line-height: 0.75rem;
            margin: 1.15rem auto;
            text-align: center;
        }

        /*tab切换*/

        .tab-grid {
            width: 100%;
            height: 2.25rem;
            overflow-x: scroll;
            overflow-y: hidden;
            background-color: white;
            position: relative;
        }

        /*控制滚动条*/

        .tab-grid::-webkit-scrollbar {
            height: 0;
        }

        .tab-item {
            float: left;
            height: 2.25rem;
            /*margin-right: 0.25rem;*/
            padding-left: 0.75rem;
            padding-right: 0.75rem;
            line-height: 2.25rem;
            text-align: center;
            font-size: 0.75rem;
            color: #333;
        }

        .tab-item-all {
            width: 10000%;
            padding-left: 0.15rem;
        }

        .item_active {
            font-weight: bold;
            color: #E73C5C;
            font-size: 0.75rem;
            background-size: 100% 2px;
            background-repeat: no-repeat;
            background-position: bottom;
            background-image: linear-gradient(to right, transparent 40%, #E73C5C 40%, #E73C5C 60%, transparent 60%, transparent 100%);
            background-image: -webkit-linear-gradient(to right, transparent 20%, #E73C5C 20%, #E73C5C 80%, transparent 80%, transparent 100%);
        }

        .aui-bar-nav .aui-iconfont {
            position: relative;
            font-family: "aui_iconfont" !important;
            font-size: 0.75rem;
            color: #E73C5C;
            font-style: normal;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
            height: 2.4rem;
        }

        .aui-bar-nav {
            background-color: #fff;
        }

        .aui-icon-tu {
            height: 2.4rem;
            width: 49px;
            background: url('__IMG__left.png') no-repeat 0.5rem center;
            background-size: 22px 22px;
        }

        .aui-bar-nav .aui-title {
            font-size: 0.9rem;
            color: #333333;
            font-weight: 500;
        }

        .aui-icon-rightu {
            height: 2.4rem;
            width: 49px;
            background: url('__IMG__search.png') no-repeat 0.6rem center;
            background-size: 22px 22px;
        }
    </style>
</head>
<body>

<!--tab切换-->
{if count($list)>0}
<div class="activity">
    <div class="upOrDown">
        <div class="upOrDown_data">
            {volist name='list' id="vv"}
            <div class="activityDetails flex-wrap underLine2" onclick="fnActive(this)" idd="{$vv.active_id}" tapmode='acdtive'>
                <div class="activityImg">
                    <img src="{$vv.active_image}" class="showImg">
                </div>
                <div class="activityContent flex-con">
                    <div>
                        <div class="activityTitle aui-ellipsis-1">{$vv.active_name}</div>
                        <div class="box" style="padding-top: 1px">
                            <div class="logo1"></div>
                            <div class="destination aui-ellipsis-1">{$vv.active_address}</div>
                        </div>
                        <div class="box">
                            <div class="logo2"></div>
                            <div class="activityTime">{$vv.active_start_time}至{$vv.active_end_time}</div>
                        </div>
                    </div>
                    <div class="report flex-wrap">
                        {if $vv.active_status==1}
                        <div class="signUp flex-con">
                            <img src="__IMG__xian.png" alt="" class="xian">报名中
                        </div>
                        {else /}
                        <div class="signUp2 flex-con">
                            已结束
                        </div>
                        {/if}
                    </div>
                </div>
            </div>
            {/volist}
        </div>
    </div>
</div>
{else /}
<div class="seat" id="seatAll">
    <img src="__IMG__quesheng/no_content.png" class="seatImg" style="width: 110px;height: 110px;"/>
    <div class="seatName">没有符合条件的内容 </div>
</div>
{/if}
</body>
<div style="height: 2rem;width: 100%;"></div>
<div class="underNav">
    <div class="kuai" onclick="opennew(1);" style='width:50%;text-align:center;'>
        <img src="__IMG__nav/navnav1.png" alt="">
        <div class="Navfont1">首页</div>
    </div>
    <div class="kuai" onclick="opennew(2);" style='width:50%;text-align:center;'>
        <img src="__IMG__nav/navnav55.png" alt="">
        <div class="Navfont">我的</div>
    </div>
</div>
<div class="toast-wrap"></div>
<script type="text/javascript" src="__JS__jquery.min.js"></script>

<script type="text/javascript" src="__JS__dropload.min.js"></script>
<script type="text/javascript" src="__JS__api.js"></script>
<script type="text/javascript" src="__JS__tt.js"></script>
<script type="text/javascript" src="__JS__layer_mobile/layer.js"></script>

<script type="text/javascript">
    // 导航栏跳转
    function opennew(index) {
        if (index == 1) {
            location.href = '{:url("Index/index")}';
        }else{
            location.href = '{:url("My/index")}';
        }

    }
    // 活动详情
    function fnActive(el) {
        var idd = $api.attr(el, 'idd')
        location.href = '{:url("Index/activitydatail")}?activity_id=' + idd;
    }
</script>
<script>
    var page = 1;
    /**
     * 上拉加载，下拉刷新
     */
    var dropload = $('.upOrDown').dropload({
        scrollArea: window,
        autoLoad: true,
        loadDownFn: function (me) {
            page++;
            $.ajax({
                url: '{:url("Index/ajaxactivitylist")}',
                data: 'page=' + page,//
                type: 'POST',
                dataType: 'JSON',
                success: function (data) {
                    var arrLen = data.msg.length;
                    if (arrLen <= 0) {

                        me.lock();
//                         无数据
                        me.noData(true);
                        // 每次数据加载完，必须重置
                        me.resetload();
                    } else {
                        var datas = data.msg;
                        $.each(datas, function (key, v) {
                            var _html = '';
                            _html += '<div class="activityDetails flex-wrap underLine2 cooc" id="' + v.active_id + '" tapmode="acdtive">';
                            _html += '<div class="activityImg">';
                            _html +='<img src="' + v.active_image + '" class="showImg">';

                            _html +='</div>';
                            _html += '<div class="activityContent flex-con"><div>';
                            _html += '<div class="activityTitle aui-ellipsis-1">' + v.active_name + '</div>';
                            _html += '<div class="box"  style="padding-top: 1px">';
                            _html += '<div class="logo1"></div>';
                            _html += '<div class="destination aui-ellipsis-1">' + v.active_address + '</div></div>';
                            _html += '<div class="box"> <div class="logo2"></div>';
                            _html += '<div class="activityTime">' + v.active_start_time + '至' + v.active_end_time + '</div></div></div>';

                            _html += '<div></div><div class="report flex-wrap">';
                           if (v.active_status == 1) {
                                _html += '<div class="signUp flex-con">';
                                _html += '<img src="__IMG__xian.png" alt="" class="xian">报名中</div> </div> </div> </div>';
                            }else {
                                _html += '<div class="signUp2 flex-con">';
                                _html += '已结束</div> </div> </div> </div>';
                            }
                            $(".upOrDown_data").append(_html);

                        });
//                        $('.upOrDown_data').append(data);
                        // 每次数据加载完，必须重置
                        me.resetload();
                    }
                    $('.cooc').click(function () {
                        var id = $(this).attr('id');
                        location.href = '{:url("Index/activitydatail")}?activity_id=' + id ;
                    });
                },
                error: function (xhr, type) {
//                    alert('Ajax error!');
                    // 即使加载出错，也得重置
                    me.resetload();
                }
            });
        },
        loadUpFn: function (me) {
            page = 1;
            $.ajax({
                url: '{:url("Index/ajaxactivitylist")}',
                data: 'page=' + page,
                type: 'POST',
                dataType: 'json',
                success: function (data) {
                    $('.upOrDown_data').empty();//
                    var datas = data.msg;
                    $.each(datas, function (key, v) {
                        var _html = '';
                        _html += '<div class="activityDetails flex-wrap underLine2 cooc" id="' + v.active_id + '" tapmode="acdtive">';
                        _html += '<div class="activityImg">';
                        _html +='<img src="' + v.active_image + '" class="showImg">';

                        _html +='</div>';
                        _html += '<div class="activityContent flex-con"><div>';
                        _html += '<div class="activityTitle aui-ellipsis-1">' + v.active_name + '</div>';
                        _html += '<div class="box"  style="padding-top: 1px">';
                        _html += '<div class="logo1"></div>';
                        _html += '<div class="destination aui-ellipsis-1">' + v.active_address + '</div></div>';
                        _html += '<div class="box"> <div class="logo2"></div>';
                        _html += '<div class="activityTime">' + v.active_start_time + '至' + v.active_end_time + '</div></div></div>';

                        _html += '<div></div><div class="report flex-wrap">';
                        if (v.active_status == 1) {
                            _html += '<div class="signUp flex-con">';
                            _html += '<img src="__IMG__xian.png" alt="" class="xian">报名中</div> </div> </div> </div>';
                        }else {
                            _html += '<div class="signUp2 flex-con">';
                            _html += '已结束</div> </div> </div> </div>';
                        }
                        $(".upOrDown_data").append(_html);

                    });

                    me.resetload();
                    me.unlock();
                    me.noData(false);
                    $('.cooc').click(function () {
                        var id = $(this).attr('id');
                        location.href = '{:url("Index/activitydatail")}?activity_id=' + id;
                    });
                },
                error: function (xhr, type) {
//                    alert('Ajax error!');
                    me.resetload();
                }
            });
        }
    });
</script>
</html>
